#include "ACT/Script/ScriptInstruction/ScriptInstruction.h"

MEMSDataHandler* ScriptInstruction::mEMSDataHandler = Q_NULLPTR;
ScriptRunner* ScriptInstruction::scriptRunner = Q_NULLPTR;
TurnTableCodec* ScriptInstruction::turnTableCodec = Q_NULLPTR;
TurnTableRunningStateManager* ScriptInstruction::turnTableRunningStateManager = Q_NULLPTR;
TurnTableConnectionStateManager* ScriptInstruction::turnTableConnectionStateManager = Q_NULLPTR;

void ScriptInstruction::objectAutoInjection(QHash<QString, QObject*>* objMap)
{
	setMEMSDataHandler(getObjFromMap<MEMSDataHandler>(objMap));
	setScriptRunner(getObjFromMap<ScriptRunner>(objMap));
	setTurnTableCodec(getObjFromMap<TurnTableCodec>(objMap));
	setTurnTableRunningStateManager(getObjFromMap<TurnTableRunningStateManager>(objMap));
	setTurnTableConnectionStateManager(getObjFromMap<TurnTableConnectionStateManager>(objMap));
}